<div class="es-box status-side">
  <h2>{{ config.title|default(config.defaultTitle) }}</h2>
  {% set learns = data('LatestFinishedLearns', {'count':config.count}) %}
  {% if learns %}
  <ul class="media-list">
    {% for dongtai in learns %}
      {% if dongtai %}
        <li class="media">
          <a class="pull-left" href="{{ path('user_show', {id:dongtai.user.id}) }}">
            <img class="img-circle media-object" src="{{ file_path(dongtai.user.mediumAvatar, 'avatar.png') }}">
          </a>
          <div class="media-body">
            <a href="{{ path('user_show', {id:dongtai.user.id}) }}">{{dongtai.user.nickname}}</a>
            {% if dongtai.status == 'learning' %}
              正在学习
            {% else %}
              在{{ dongtai.finishedTime|smart_time }} 完成了
            {% endif %}
            <a href="{{ path('course_show', {id:dongtai.courseId}) }}">《{{ dongtai.lesson.title|plain_text(15) }}》</a>
            的学习
          </div>
        </li>
      {% endif %}
    {% endfor %}
  </ul>
  {% else %}
         <div class="empty">还没有动态</div>
  {% endif %}
</div>